<template>
  <view>
    <!-- url为要跳转外链的地址-->
    <web-view :src="H5Url" />
  </view>
</template>

<script>
export default {
  name: 'Pol',
  data() {
    return {
      H5Url: ''
    }
  },
  onLoad(val) {
    this.H5Url = val.url
    // 设置当前的title 如果外链中有的话将被覆盖
    if (this.isNotEmpty(val.title)) {
      this.setTitle(val.title);
    }
  },
  methods: {
    isNotEmpty(obj) {
      if (typeof obj == undefined || obj == null || obj == '' || obj == 'undefined' || obj.length == 0) {
        return false;
      } else {
        return true;
      }
    },
    // 设置title
    setTitle(title) {
      uni.setNavigationBarTitle({
        title: title
      })
    },
  }
}
</script>

<style scoped>
.mui-content{
  font-size: 30rpx;
  line-height: 50rpx;
  padding: 20rpx;
}
.mui-title{
  font-size: 38rpx;
  text-align: center;
  font-weight: bold;
  margin: 20rpx 0rpx;
}
body {
  background-color: #fff;
}

.text-bold {
  font-weight: bold;
}

.text-indent {
  text-indent: 44rpx;
}

.title {
  font-size: 28rpx;
  font-weight: bold;
  margin-top: 20rpx;
}
</style>
